var annualBranchInfo = null;
var annualLicenceInfo = null;
var vAnnualReportBranchProductionInfo = null;
var sponsorInfo = null;
var forGuaranteeinfo = null;
var alterEInfo = null;
var forGuaranteeinfoOrNoUrl = null;
var webSiteInfoUrl = null;
var sponsorUrl = null;
var forInvestmentUrl = null;
var baseinfoUrl = null;
//社保信息
var annSocsecinfoUrl = null;
//对外担保
var forGuaranteeinfoUrl = null;
//年报修改
var alterUrl = null;
//企业年报中 分支机构的生产经营信息
var vAnnualReportBranchProductionUrl = null;
var vAnnualReportAlterstockinfoUrl = null;
//农专分支机构
var vAnnualReportSfcBranchUrl = null;
//农专个体许可
var annulLicenceUrl = null;
//年报修改条数
var alterTotalPageUrl = null;
//sfc企业资产信息
var vannualSfcAssertUrl = null;
//pb企业资产信息
var vAnnPbAssetUrl = null;
//年份
var anCheYearJs = null;

//年报个体经营资产信息是否公示
var ratGroDis = null;

//全部网站网店信息   全部对外投资信息
var allWebInfoUrl = null;
var allForinvestmentInfoUrl = null;
//model  网页网站信息
var allWebInfoModelUrl = null;
var allForgModelUrl = null;

var assert_item_name_container = [];

function convertDate(obj) {
    if (obj == null) {
        return "";
    } else {
        date = new Date(obj);
        return date.getFullYear() + "年" + (date.getMonth() + 1) + "月" + date.getDate() + "日"
    }
}



function showAnnualReport2(entType){
    var entTypeResultForJs = entType;
    var ent_type_result = entType;
    //网店网址
    var back_ancheid = $('#ancheid').val();
    var anCheIdJs = null;
    var entTypeJs = null;

    var anCheYear = $('#ancheyear').val();

    $.ajax({
        type: "POST",
        url: anCheYearInfo,
        dataType: "JSON",
        async: false,
        success: function (data) {
            for(var i =0;i<data.length;i++){
                var _data = data[i];
                if(_data.anCheId.indexOf(back_ancheid)==-1) continue;
                entTypeJs = _data.entType;
                anCheIdJs = _data.anCheId;
                if (entTypeJs == "e"){
                    $.ajax({
                        type: "POST",
                        url: VAnnualReportBaseinfoUrl
                        + anCheIdJs
                        + ".html",
                        dataType: "JSON",
                        async: false,
                        success: function (data) {
                            var json = eval(data);
                            if (json.uniscId != null && json.uniscId != "") {
                                $("#uniscId").append(json.uniscId);
                            } else {
                                $("#uniscId").append(json.regNo);
                            }
                            $("#entName").append(json.entName);
                            $("#tel").append(json.tel);
                            $("#addr").append(json.addr);
                            $("#postalCode").append(json.postalCode);
                            $("#email").append(json.email);
                            $("#busSt").append(json.busSt_CN);
                            if(json.womemPNumDis == "1") {
                                json.womemPNum!= null && !isNaN(json.womemPNum) && $("#womemPNum").append(json.womemPNum+'人');
                            } else {
                                $("#womemPNum").append("企业选择不公示");
                            }
                            $("#mainBusiAct").append(json.mainBusiAct);
                            if(json.holdingSmsgDis == '1'){
                                $("#holdingSmsg").append(json.holdingSmsg_cn);
                            } else {
                                $("#holdingSmsg").append("企业选择不公示");
                            }

                            var javascriptanChedate = convertDate(json.anCheDate);

                            $("#anCheDate").append(javascriptanChedate);

                            // 隶属企业名称
                            $("#dependentName").append(json.dependentEntName);
                            $("#dependentUniscId").append();
                            if(json.empNumDis == "1") {
                                json.empNum!= null && !isNaN(json.empNum) && $("#empNum").append(json.empNum+'人');
                            } else {
                                $("#empNum").append("企业选择不公示");
                            }
                            /*if (json.anCheYear != null
                                && (entTypeResultForJs != 18)) {
                                $("#reportName").prepend(json.anCheYear+ "年度报告");
                            } else {
                                $("#reportName").prepend("无年度报告");
                            }*/
                            var javascriptDate = convertDate(
                                json.anCheDate);

                            if ((entTypeResultForJs != 18)) {
                                $("#reportFillIn").prepend(javascriptDate);
                            } else {
                                $("#reportFillIn").prepend("无");
                            }

                            // 获取anCheId
                            var anCheId = json.anCheId;
                            $.ajax({
                                type: "POST",
                                url: vAnnualReportBaseInfoForJsUrl
                                + anCheId
                                + ".html",
                                dataType: "JSON",
                                async: false,
                                success: function (data) {
                                    var json = eval(data);
                                    webSiteInfoUrl = json.webSiteInfoUrl;
                                    sponsorUrl = json.sponsorUrl;
                                    forInvestmentUrl = json.forInvestmentUrl;
                                    baseinfoUrl = json.baseinfoUrl;
                                    alterUrl = json.alterUrl;
                                    vAnnualReportAlterstockinfoUrl = json.vAnnualReportAlterstockinfoUrl;
                                    forGuaranteeinfoUrl = json.forGuaranteeinfoUrl;
                                    alterTotalPageUrl = json.alterTotalPageUrl;
                                    vAnnualReportBranchProductionUrl = json.vAnnualReportBranchProductionUrl;
                                    forGuaranteeinfoOrNoUrl = json.forGuaranteeinfoOrNoUrl;
                                    allWebInfoUrl = json.allWebInfoUrl;
                                    allForinvestmentInfoUrl = json.allForinvestmentInfoUrl;
                                    allWebInfoModelUrl = json.allWebInfoModelUrl;
                                    allForgModelUrl = json.allForgModelUrl;
                                    annSocsecinfoUrl = json.annSocsecinfoUrl;
                                    /*$.ajax({
                                        type: "POST",
                                        url: alterTotalPageUrl
                                        + "?entType="
                                        + entTypeResultForJs,
                                        dataType: "JSON",
                                        async: false,
                                        success: function (data) {
                                            var json = eval(data);
                                            var intEntType = parseInt(entTypeResultForJs);
                                            if ((intEntType != 18)) {
                                                if (anCheYearJs >= 2016) {
                                                    $("#Annual_modify").prepend("<a href='#modifyMark' style='color:#ed1d4a;'>" +
                                                            json.recordsTotal
                                                            + "  条修改记录</a>");
                                                } else {
                                                    $("#Annual_modify").prepend("<a href='#modifyMark'  style='color:#ed1d4a;'>" +
                                                            json.recordsTotal
                                                            + "  条修改记录</a>");
                                                }

                                            }

                                        }

                                    });*/
                                }
                            });
                        }
                    });
                }else if (entTypeJs == "sfc") {
                    $.ajax({
                        type: "POST",
                        url: VAnnualReportSfcBaseinfoUrl
                        + anCheIdJs
                        + ".html",
                        dataType: "JSON",
                        async: false,
                        success: function (data) {
                            var json = eval(data);
                            if(!json.uniscId){
                            	$("#SfcuniscId").append(json.regNo);
                            }else{
                            	$("#SfcuniscId").append(json.uniscId);
                            }
                            $("#tel").append(json.tel);
                            $("#addr").append(json.addr);
                            $("#SfcfarSpeArtName").append(json.farSpeArtName);
                            json.memNum!= null && !isNaN(json.memNum) && $("#SfcmemNum").append(json.memNum +'人');
                            json.farnum!= null && !isNaN(json.farnum) && $("#Sfcfarnum").append(json.farnum +'人');
                            json.annNewMemNum!= null && !isNaN(json.annNewMemNum) && $("#SfcannNewMemNum").append(json.annNewMemNum +'人');
                            json.annRedMemNum!= null && !isNaN(json.annRedMemNum) && $("#SfcannRedMemNum").append(json.annRedMemNum +'人');
                            $("#Sfctel").append(json.tel);
                            var javascriptanChedate = convertDate(json.anCheDate);
                            if(json.empNumDis == "1") {
                                json.empNum!= null && !isNaN(json.empNum) && $("#empNum").append(json.empNum+'人');
                            } else {
                                $("#empNum").append("选择不公示");
                            }
                            if(json.womEmpNumDis == "1") {
                                json.womEmpNum!= null && !isNaN(json.womEmpNum) && $("#womemPNum").append(json.womEmpNum +'人');
                            } else {
                                $("#womemPNum").append("选择不公示");
                            }
                            $("#mainBusiAct").append(json.mainBusiAct);
                            if(json.holdingSmsgDis == '1'){
                                $("#holdingSmsg").append(json.holdingSmsg);
                            } else {
                                $("#holdingSmsg").append("选择不公示");
                            }

                            $("#anCheDate").append(javascriptanChedate);
                            $("#Sfcemail").append(json.email);
                            /*if (json.anCheYear != null&& (entTypeResultForJs != 18)) {
                                $("#reportName").prepend(json.anCheYear+ "年度报告");
                            } else {
                                $("#reportName").prepend("无年度报告");
                            }*/
                            var javascriptDate = convertDate(json.anCheDate);

                            if ((entTypeResultForJs != 18)) {
                                $("#reportFillIn").prepend(javascriptDate);
                            } else {
                                $("#reportFillIn").prepend("无");
                            }

                            var anCheId = json.anCheId;

                            $.ajax({
                                type: "POST",
                                url: vAnnualSfcReportBaseInfoForJsUrl
                                + anCheId
                                + ".html",
                                dataType: "JSON",
                                async: false,
                                success: function (data) {
                                    var json = eval(data);
                                    webSiteInfoUrl = json.webSiteInfoUrl;
                                    baseinfoUrl = json.baseinfoUrl;
                                    alterUrl = json.alterUrl;
                                    vAnnualReportSfcBranchUrl = json.vAnnualReportSfcBranchUrl;
                                    annulLicenceUrl = json.annulLicenceUrl;
                                    alterTotalPageUrl = json.alterTotalPageUrl;
                                    vannualSfcAssertUrl = json.vannualSfcAssertUrl;
                                    //alert(webSiteInfoUrl);
                                    allWebInfoUrl = json.allWebInfoUrl;
                                    allForinvestmentInfoUrl = json.allForinvestmentInfoUrl
                                    allWebInfoModelUrl = json.allWebInfoModelUrl;
                                    annSocsecinfoUrl = json.annSfcSocsecinfoUrl;
                                    /*$.ajax({
                                        type: "POST",
                                        url: alterTotalPageUrl
                                        + "?entType="
                                        + entTypeResultForJs,
                                        dataType: "JSON",
                                        async: false,
                                        success: function (data) {
                                            var json = eval(data);
                                            var intEntType = parseInt(entTypeResultForJs);
                                            if ((intEntType != 18)) {
                                                if (anCheYearJs >= 2016) {
                                                    $("#Annual_modify").prepend("<a href='#modifyMark' style='color:#ed1d4a;'>" +
                                                            json.recordsTotal
                                                            + "  条修改记录</a>");
                                                } else {
                                                    $("#Annual_modify").prepend("<a href='#modifyMark'  style='color:#ed1d4a;'>" +
                                                            json.recordsTotal
                                                            + "  条修改记录</a>");
                                                }
                                            }
                                        }

                                    })*/
                                }
                            });
                        }
                    });
                }else if (entTypeJs == "pb"
                    && anCheIdJs != null && ("undefined" != typeof(anCheIdJs))) {
                    $.ajax({
                        type: "POST",
                        url: VAnnualReportPbBaseinfoUrl
                        + anCheIdJs
                        + ".html",
                        dataType: "JSON",
                        async: false,
                        success: function (data) {
                            var json = eval(data);
                            // console.log(json);
                            $("#PbuniscId").append(json.uniscId);
                            $("#PbtraName").append(json.traName);
                            $("#Pbname").append(json.name);
                            $("#Pbtel").append(json.tel);
                            $("#PbempNum").append(json.empNum);
                            $("#PbfundAm").append(json.fundAm+'万');
                            var javascriptanChedate = convertDate(json.anCheDate);

                            if(json.womemPNumDis == "1") {
                                json.womemPNum!=null ? $("#womemPNum").append(json.womemPNum+'人'):$("#womemPNum").append('');
                            } else {
                                $("#womemPNum").append("企业选择不公示");
                            }
                            $("#mainBusiAct").append(json.mainBusiAct);
                            if(json.holdingSmsgDis == '1'){
                                $("#holdingSmsg").append(json.holdingSmsg);
                            } else {
                                $("#holdingSmsg").append("企业选择不公示");
                            }

                            $("#anCheDate").append(javascriptanChedate);
                            /*if (json.anCheYear != null
                                && (entTypeResultForJs != 18)) {
                                $("#reportName").prepend(json.anCheYear+ "年度报告");
                            } else {
                                $("#reportName").prepend("无年度报告");
                            }*/
                            var javascriptDate = convertDate(
                                json.anCheDate);

                            if ((entTypeResultForJs != 18)) {
                                $("#reportFillIn").prepend(javascriptDate);
                            } else {
                                $("#reportFillIn").prepend("无");
                            }
                            var anCheId = json.anCheId;
                            $.ajax({
                                type: "POST",
                                url: vAnnualPbReportBaseInfoForJsUrl
                                + anCheId
                                + ".html",
                                dataType: "JSON",
                                async: false,
                                success: function (data) {
                                    var json = eval(data);
                                    webSiteInfoUrl = json.webSiteInfoUrl;
                                    alterUrl = json.alterUrl;
                                    vAnnualReportSfcBranchUrl = json.vAnnualReportSfcBranchUrl;
                                    annulLicenceUrl = json.annulLicenceUrl;
                                    alterTotalPageUrl = json.alterTotalPageUrl;
                                    vAnnPbAssetUrl = json.vAnnPbAssetUrl;
                                    allWebInfoUrl = json.allWebInfoUrl;
                                    allForinvestmentInfoUrl = json.allForinvestmentInfoUrl
                                    allWebInfoModelUrl = json.allWebInfoModelUrl;

                                    /*$.ajax({
                                        type: "POST",
                                        url: alterTotalPageUrl
                                        + "?entType="
                                        + entTypeResultForJs,
                                        dataType: "JSON",
                                        async: false,
                                        success: function (data) {
                                            var json = eval(data);
                                            var intEntType = parseInt(entTypeResultForJs);
                                            if ((intEntType != 18)) {
                                                if (anCheYearJs >= 2016) {
                                                    $("#Annual_modify").prepend("<a href='#modifyMark' style='color:#ed1d4a;'>" +
                                                            json.recordsTotal
                                                            + "  条修改记录</a>");
                                                } else {
                                                    $("#Annual_modify").prepend("<a href='#modifyMark'  style='color:#ed1d4a;'>" +
                                                            json.recordsTotal
                                                            + "  条修改记录</a>");
                                                }
                                            }
                                        }

                                    })*/
                                }
                            });
                        }
                    });
                }
                var baseinfoColumns = [
                    "assGro",
                    "totEqu",
                    "vendInc",
                    "maiBusInc",
                    "ratGro",
                    "proGro",
                    "netInc",
                    "liaGro"
                ];


                //企业年报信息 资产信息是否公示
                if(baseinfoUrl){
                    $.ajax({
                        type: "POST",
                        url: baseinfoUrl,
                        dataType: "JSON",
                        async: false,
                        success: function (data) {
                            if (data.data != null && data.data.length > 0) {
                                //资产总额是否公示
                                var assGroDisIs = data.data[0].assGroDis;
                                if (assGroDisIs == 1) {
                                    $("#assGroDisIs").html("").html((data.data[0].assGro||'')+ (typeof(data.data[0].assGro) == 'number' ? ' 万元':''));
                                } else {
                                    $("#assGroDisIs").html("").html("企业选择不公示");
                                }
                                //所有者权益合计是否公示
                                var totEquDisIs = data.data[0].totEquDis;
                                if (totEquDisIs == 1) {
                                    $("#totEquDisIs").html("").html((data.data[0].totEqu||'')+ (typeof(data.data[0].totEqu) == 'number' ? ' 万元':''));
                                } else {
                                    $("#totEquDisIs").html("").html("企业选择不公示");
                                }
                                //营业总收入是否公示
                                var vendIncDisIs = data.data[0].vendIncDis;
                                if (vendIncDisIs == 1) {
                                    $("#vendIncDisIs").html("").html((data.data[0].vendInc||'')+ (typeof(data.data[0].vendInc) == 'number' ? ' 万元':''));
                                } else {
                                    $("#vendIncDisIs").html("").html("企业选择不公示");
                                }
                                //利润总额是否公示
                                var proGroDisIs = data.data[0].proGroDis;
                                if (proGroDisIs == 1) {
                                    $("#proGroDisIs").html("").html((data.data[0].proGro||'')+ (typeof(data.data[0].proGro) == 'number' ? ' 万元':''));
                                } else {
                                    $("#proGroDisIs").html("").html("企业选择不公示");
                                }
                                //其中主营业务收入是否公示
                                var maiBusIncDisIs = data.data[0].maiBusIncDis;
                                if (maiBusIncDisIs == 1) {
                                    $("#maiBusIncDisIs").html("").html((data.data[0].maiBusInc||'')+ (typeof(data.data[0].maiBusInc) == 'number' ? ' 万元':''));
                                } else {
                                    $("#maiBusIncDisIs").html("").html("企业选择不公示");
                                }
                                //净利润是否公示
                                var netIncDisIs = data.data[0].netIncDis;
                                if (netIncDisIs == 1) {
                                    $("#netIncDisIs").html("").html((data.data[0].netInc||'')+ (typeof(data.data[0].netInc) == 'number' ? ' 万元':''));
                                } else {
                                    $("#netIncDisIs").html("").html("企业选择不公示");
                                }
                                //纳税总额是否公示
                                var ratGroDisIs = data.data[0].ratGroDis;
                                if (ratGroDisIs == 1) {
                                    $("#ratGroDisIs").html("").html((data.data[0].ratGro||'')+ (typeof(data.data[0].ratGro) == 'number' ? ' 万元':''));
                                } else {
                                    $("#ratGroDisIs").html("").html("企业选择不公示");
                                }
                                //负债总额是否公示
                                var liaGroDisIs = data.data[0].liaGroDis;
                                if (liaGroDisIs == 1) {
                                    $("#liaGroDisIs").html("").html((data.data[0].liaGro||'')+ (typeof(data.data[0].liaGro) == 'number' ? ' 万元':''));
                                } else {
                                    $("#liaGroDisIs").html("").html("企业选择不公示");
                                }
                            }
                        }
                    })
                }
                // 企业年报信息中 社保信息
                if(annSocsecinfoUrl){
                    $.ajax({
                        type: "POST",
                        url: annSocsecinfoUrl,
                        dataType: "JSON",
                        async: false,
                        success: function (data) {
                            if (data.data != null && data.data.length > 0) {
                                if (data.data[0].so110 != null) {
                                    $("#so110").html("").html(data.data[0].so110 + (typeof(data.data[0].so110) == 'number' ? '人':''));
                                }
                                if (data.data[0].so210 != null) {
                                    $("#so210").html("").html(data.data[0].so210 + (typeof(data.data[0].so210) == 'number' ?  '人':''));
                                }
                                if (data.data[0].so310 != null) {
                                    $("#so310").html("").html(data.data[0].so310 + (typeof(data.data[0].so310) == 'number' ?  '人':''));
                                }
                                if (data.data[0].so410 != null) {
                                    $("#so410").html("").html(data.data[0].so410 + (typeof(data.data[0].so410) == 'number' ?  '人':''));
                                }
                                if (data.data[0].so510 != null) {
                                    $("#so510").html("").html(data.data[0].so510 + (typeof(data.data[0].so510) == 'number'?  '人':''));
                                }
                                if(data.data[0].totalWagesDis == 1){
                                    $('#totalWagesSo110').html(data.data[0].totalWagesSo110 + (typeof(data.data[0].totalWagesSo110) == 'number' ?  '万元':''));
                                    $('#totalWagesSo210').html(data.data[0].totalWagesSo210 + (typeof(data.data[0].totalWagesSo210) == 'number' ?  '万元':''));
                                    $('#totalWagesSo310').html(data.data[0].totalWagesSo310 + (typeof(data.data[0].totalWagesSo310) == 'number' ?  '万元':''));
                                    //$('#totalWagesSo410').html(data.data[0].totalWagesSo410 + (typeof(data.data[0].totalWagesSo410) == 'number' ?  '万元':''));
                                    $('#totalWagesSo510').html(data.data[0].totalWagesSo510 + (typeof(data.data[0].totalWagesSo510) == 'number' ?  '万元':''));
                                }else{
                                    $('#totalWagesSo110').html('企业选择不公示');
                                    $('#totalWagesSo210').html('企业选择不公示');
                                    $('#totalWagesSo310').html('企业选择不公示');
                                    //$('#totalWagesSo410').html('企业选择不公示');
                                    $('#totalWagesSo510').html('企业选择不公示');
                                }
                                if(data.data[0].totalPaymentDis == 1){
                                    $('#totalPaymentSo110').html(data.data[0].totalPaymentSo110 + (typeof(data.data[0].totalPaymentSo110) == 'number' ?  '万元':''));
                                    $('#totalPaymentSo210').html(data.data[0].totalPaymentSo210 + (typeof(data.data[0].totalPaymentSo210) == 'number' ?  '万元':''));
                                    $('#totalPaymentSo310').html(data.data[0].totalPaymentSo310 + (typeof(data.data[0].totalPaymentSo310) == 'number' ?  '万元':''));
                                    $('#totalPaymentSo410').html(data.data[0].totalPaymentSo410 + (typeof(data.data[0].totalPaymentSo410) == 'number' ?  '万元':''));
                                    $('#totalPaymentSo510').html(data.data[0].totalPaymentSo510 + (typeof(data.data[0].totalPaymentSo510) == 'number' ?  '万元':''));
                                }else{
                                    $('#totalPaymentSo110').html('企业选择不公示');
                                    $('#totalPaymentSo210').html('企业选择不公示');
                                    $('#totalPaymentSo310').html('企业选择不公示');
                                    $('#totalPaymentSo410').html('企业选择不公示');
                                    $('#totalPaymentSo510').html('企业选择不公示');
                                }
                                if(data.data[0].unpaidSocialInsDis == 1){
                                    $('#unPaidSocialInsSo110').html(data.data[0].unpaidSocialInsSo110 + (typeof(data.data[0].unpaidSocialInsSo110) == 'number' ?  '万元':''));
                                    $('#unPaidSocialInsSo210').html(data.data[0].unpaidSocialInsSo210 + (typeof(data.data[0].unpaidSocialInsSo210) == 'number' ?  '万元':''));
                                    $('#unPaidSocialInsSo310').html(data.data[0].unpaidSocialInsSo310 + (typeof(data.data[0].unpaidSocialInsSo310) == 'number' ?  '万元':''));
                                    $('#unPaidSocialInsSo410').html(data.data[0].unpaidSocialInsSo410 + (typeof(data.data[0].unpaidSocialInsSo410) == 'number' ?  '万元':''));
                                    $('#unPaidSocialInsSo510').html(data.data[0].unpaidSocialInsSo510 + (typeof(data.data[0].unpaidSocialInsSo510) == 'number' ?  '万元':''));
                                }else{
                                    $('#unPaidSocialInsSo110').html('企业选择不公示');
                                    $('#unPaidSocialInsSo210').html('企业选择不公示');
                                    $('#unPaidSocialInsSo310').html('企业选择不公示');
                                    $('#unPaidSocialInsSo410').html('企业选择不公示');
                                    $('#unPaidSocialInsSo510').html('企业选择不公示');
                                }
                            }
                        }
                    });
                }


                //个体年报信息   生产经营状况信息  是否公示
                if(vAnnPbAssetUrl){
                    $.ajax({
                        type: "POST",
                        url: vAnnPbAssetUrl,
                        dataType: "JSON",
                        async: false,
                        success: function (data) {
                            if (data.data != null && data.data.length > 0) {
                                //纳税总额是否公示
                                var ratGroDisIs = data.data[0].ratGroDis;
                                if (ratGroDisIs == 1) {
                                    $("#ratGroDis").html("").html((data.data[0].ratGro||'')+(typeof(data.data[0].ratGro) == 'number' ? ' 万元':''));
                                } else {
                                    $("#ratGroDis").html("").html("个体户选择不公示");
                                }
                                //营业额是否公示
                                var vendIncDisIs = data.data[0].vendIncDis;
                                if (vendIncDisIs == 1) {
                                    $("#vendIncDis").html("").html((data.data[0].vendInc||'')+(typeof(data.data[0].vendInc) == 'number' ? ' 万元':''));
                                } else {
                                    $("#vendIncDis").html("").html("个体户选择不公示");
                                }
                            }else{
                                $('#needPaging_AnRepAsset').remove();
                                $('#one').append('<p>暂无企业资产状况信息</p>');
                            }
                        }
                    })
                }

                //农专年报信息   生产经营状况信息  是否公示
                if(vannualSfcAssertUrl){
                    $.ajax({
                        type: "POST",
                        url: vannualSfcAssertUrl,
                        dataType: "JSON",
                        async: false,
                        success: function (data) {
                            if (data.data != null && data.data.length > 0) {
                                //销售额或营业收入是否公示
                                var priYeaSalesDisIs = data.data[0].priYeaSalesDis;
                                if (priYeaSalesDisIs == 1) {
                                    $("#priYeaSales").html("").html((data.data[0].priYeaSales||'')+(typeof(data.data[0].priYeaSales) == 'number' ? ' 万元':''));
                                } else {
                                    $("#priYeaSales").html("").html("农专社选择不公示");
                                }
                                //盈余总额是否公示
                                var priYeaProfitDisIs = data.data[0].priYeaProfitDis;
                                if (priYeaProfitDisIs == 1) {
                                    $("#priYeaProfit").html("").html((data.data[0].priYeaProfit||'')+(typeof(data.data[0].priYeaProfit) == 'number' ? ' 万元':''));
                                } else {
                                    $("#priYeaProfit").html("").html("农专社选择不公示");
                                }
                                //获得政府扶持资金、补助是否公示
                                var priYeaSubDisIs = data.data[0].priYeaSubDis;
                                if (priYeaSubDisIs == 1) {
                                    $("#priYeaSub").html("").html((data.data[0].priYeaSub||'')+(typeof(data.data[0].priYeaSub) == 'number' ? ' 万元':''));
                                } else {
                                    $("#priYeaSub").html("").html("农专社选择不公示");
                                }
                                //纳税金额是否公示
                                var ratGroDisIs = data.data[0].ratGroDis;
                                if (ratGroDisIs == 1) {
                                    $("#ratGro").html("").html((data.data[0].ratGro||'')+(typeof(data.data[0].ratGro) == 'number' ? ' 万元':''));
                                } else {
                                    $("#ratGro").html("").html("农专社选择不公示");
                                }
                                //金融贷款是否公示
                                var priYeaLoanDisIs = data.data[0].priYeaLoanDis;
                                if (priYeaLoanDisIs == 1) {
                                    $("#priYeaLoan").html("").html((data.data[0].priYeaLoan||'')+(typeof(data.data[0].priYeaLoan) == 'number' ? ' 万元':''));
                                } else {
                                    $("#priYeaLoan").html("").html("农专社选择不公示");
                                }
                            }else{
                            	 $("#priYeaSales").html("").html("农专社选择不公示");
                            	 $("#priYeaProfit").html("").html("农专社选择不公示");
                            	 $("#priYeaSub").html("").html("农专社选择不公示");
                            	 $("#ratGro").html("").html("农专社选择不公示");
                            	 $("#priYeaLoan").html("").html("农专社选择不公示");
                            }

                        }
                    });
                }
                // 企业年报信息
                //企业年报中的基本信息
                var VAnnualReportBaseinfoColumns = [
                    "uniscId",
                    "entName",
                    "tel",
                    "addr",
                    "postalCode",
                    "email",
                    "busSt_CN",
                    "empNum"
                ];
                //网站信息
                var webSiteInfoColumns = [
                    "webType",
                    "webSitName",
                    "domain"
                ];

                var sponsorColumns = ["index",
                    "invName",
                    "liSubConAm",
                    "subConDate",
                    "subConFormName",
                    "liAcConAm",
                    "acConDate",
                    "acConForm_CN"
                ];

                var forInvestmentColumns = [
                    "entName",
                    "uniscId"
                ];


                var forGuaranteeinfoColumns = ["index",
                    "more",
                    "mortgagor",
                    "priClaSecKind",
                    "priClaSecAm",
                    "pefPerForm",
                    "guaranperiod",
                    "gaType"
                ];

                var alterColumns = [
                    "alitem",
                    "alitem",
                    "altBe",
                    "altAf",
                    "altDate"
                ];
                //农专年报信息中的基本信息
                var annualSfcBaseInfoColumns = [
                    "uniscId",
                    "farSpeArtName",
                    "memNum",
                    "farnum",
                    "annNewMemNum",
                    "annRedMemNum",
                    "tel",
                    "email"
                ];
                //农专年报中资产信息
                var annualSfcAssertColumns = [
                    "priYeaSales",
                    "priYeaProfit",
                    "priYeaSub",
                    "ratGro",
                    "priYeaLoan"
                ];


                //农专年报信息中的行政许可信息
                var annualSfcLicenceColumns = [
                    "uniscId",
                    "licName_CN",
                    "valTo"
                ];
                //农专年报信息中的 分支机构信息
                var annualSfcBranchColumns = [
                    "uniscId",
                    "brName"
                ];
                //企业年报信息中的股权变更信息
                var vAnnualReportAlterstockColumns = ["index",
                    "inv",
                    "transAmPr",
                    "transAmAft",
                    "altDate"
                ];
                //公司年报中   分支机构经营状况信息
                var vAnnualBranchProductionColumns = [
                    "maiBusInc",
                    "ratGro",
                    "netInc"
                ];
                //个体年报中，个体商户的基本信息
                var vannualReportPBBaseInfoColumns = [
                    "uniscId",
                    "traName",
                    "name",
                    "tel",
                    "empNum",
                    "fundAm"
                ];
                //个体年报中  个体商户的资产状况信息
                var vAnnualPbBaseInfoDetailColumns = [
                    "vendInc",
                    "ratGro"
                ];


                //企业的网站信息
                if (webSiteInfoUrl != null) {


                }


                //农专年报 分支机构信息
                if (vAnnualReportSfcBranchUrl != null) {
                    $.ajax({
                        type: "POST",
                        url: vAnnualReportSfcBranchUrl,
                        dataType: "JSON",
                        async: false,
                        success: function (data) {
                            if(data.data && data.data.length){

                                if (data.totalPage > 1) {
                                    var ancheid = $('#ancheid').val();
                                    var nodenum = $('#nodenum').val();
                                    var a_allBranchInfoUrl = 'corp-query-entprise-info-annualReportBranchinfo-PROVINCENODENUM'+nodenum+ancheid+'.html';
                                    $("#annualBranchColor .personCount").append("<a href='" + a_allBranchInfoUrl + "' target='_blank'><<查看全部>></a>");
                                }

                                $('#a_branchCount').html('共计  '+data.recordsTotal+' 条信息');

                                var str='';
                                for(var i =0;i<data.data.length;i++){
                                    var str1 = "";
                                    if (data.data[i].brName != null && data.data[i].brName != "" && data.data[i].brName.length > 0) {
                                        if (data.data[i].brName > 22) {
                                            str1 = data.data[i].brName.substring(0, 22);
                                            str1 += "...";
                                        } else {
                                            str1 = data.data[i].brName;
                                        }
                                    }

                                    if(data.data[i].uniscId !=null && data.data[i].uniscId !=""){
                                         str+='<li class="branchInfo-list" style="height:70px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;"><a><div style="font-size:14px;color:#333333;" title="' + data.data[i].brName + '">'
                                         + str1 + '</div><span style="font-size:12px;color:#666666;">· 统一社会信用代码/注册号 :'
                                         + '<span style="font-size:12px;color:#333333;">' + data.data[i].uniscId + '</span></a></li>';
                                    }else{
                                         str+='<li class="branchInfo-list" style="height:70px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;"><a><div style="font-size:14px;color:#333333;" title="' + data.data[i].brName + '">'
                                         + str1 + '</div><span style="font-size:12px;color:#666666;">· 统一社会信用代码/注册号 :'
                                         + '<span style="font-size:12px;color:#333333;"></span></a></li>';
                                    }
                                }
                                $('#a_branchGroupForAll').html(str);
                            }else{
                                $('#a_branchGroupForAll').html('<tr class="odd"><td style="background:#F3F7FA;color:#666" width="1077px" id="dataTables_empty">暂无分支机构信息</td></tr>');
                            }
                        }
                    });
                }
                //农专年报中   许可信息
                if (annulLicenceUrl != null) {
                    annualLicenceInfo = $("#needPaging_AnnLicenceinfo").DataTable({
                        "bAutoWidth": false,
                        "pagingType": "full_numbers",
                        "language": {
                            "processing": "正在加载，请稍后",
                            "lengthMenu": "显示 _MENU_ 项结果",
                            "zeroRecords": "暂无行政许可信息",
                            "info": "共 查询到 _TOTAL_ 条记录    共 _PAGES_ 页 ",
                            "infoEmpty": "共 查询到 0 条记录    共 0 页",
                            "infoFiltered": "(由 _MAX_ 项结果过滤)",
                            "infoPostFix": "",
                            "url": "",
                            "paginate": {
                                "first": "首页",
                                "previous": "上一页",
                                "next": "下一页",
                                "last": "末页"
                            }
                        },
                        "processing": true,
                        "serverSide": true,
                        "ordering": false,
                        "ajax": {
                            "url": annulLicenceUrl + "?entType=" + ent_type_result,
                            "type": "POST"
                        },
                        "columns": tablecolumns(annualSfcLicenceColumns),
                        "destroy": true,
                        "columnDefs": [{
                            "targets": 2,
                            "render": function (data) {
                                var javascriptDate = convertDate(data);
                                return "<tr>" + javascriptDate + "</tr>";
                            }
                        },{
                            "targets": [0],
                            "render": function (data, x, obj, index, y) {
                                return index.row + index.settings._iDisplayStart + 1;
                            }
                        }]
                    });
                }
                //alert(vAnnualReportBranchProductionUrl);
                //企业年报分支机构信息生产经营状况
                if (vAnnualReportBranchProductionUrl != null) {
                    // vAnnualReportBranchProductionInfo = new customtable2("needPaging_branchProduction", vAnnualReportBranchProductionUrl, vAnnualBranchProductionColumns, "生产经营状况信息");
                    $.ajax({
                        type: "POST",
                        url: vAnnualReportBranchProductionUrl,
                        dataType: "JSON",
                        async: false,
                        success: function (data) {
                            if(data && data.data){
                                var data = data.data[0];
                                var tds = $('#needPaging_branchProduction').find('td');
                                if(data.maiBusIncDis==1){
                                    tds.eq(0).html(Math.round(data.maiBusInc));
                                }else{
                                    tds.eq(0).html('企业选择不公示');
                                }
                                if(data.netIncDis==1){
                                    tds.eq(1).html(Math.round(data.netInc));
                                }else{
                                    tds.eq(1).html('企业选择不公示');
                                }
                                if(data.ratGroDis==1){
                                    tds.eq(2).html(Math.round(data.ratGro));
                                }else{
                                    tds.eq(2).html('企业选择不公示');
                                }
                            }else{
                               $('#needPaging_branchProduction').remove();
                               $('#onePbAss').append('<p>暂无生产经营状态信息</p>')
                            }

                        }
                    });
                }
                //股东股权信息 初始化变量
                var AlterStockInfo = null;
                if (vAnnualReportAlterstockinfoUrl != null) {
                    vAnnualReportAlterstockInfo = $("#needPaging_shareChanged").DataTable({
                        "bAutoWidth": false,
                        "pagingType": "full_numbers",
                        "language": {
                            "processing": "正在加载，请稍后",
                            "lengthMenu": "显示 _MENU_ 项结果",
                            "zeroRecords": "暂无股权变更信息",
                            "info": "共 查询到 _TOTAL_ 条记录    共 _PAGES_ 页 ",
                            "infoEmpty": "共 查询到 0 条记录    共 0 页",
                            "infoFiltered": "(由 _MAX_ 项结果过滤)",
                            "infoPostFix": "",
                            "url": "",
                            "paginate": {
                                "first": "首页",
                                "previous": "上一页",
                                "next": "下一页",
                                "last": "末页"
                            }
                        },
                        "processing": true,
                        "serverSide": true,
                        "ordering": false,
                        "ajax": {
                            "url": vAnnualReportAlterstockinfoUrl,
                            "type": "GET"
                        },
                        "columns": tablecolumns(vAnnualReportAlterstockColumns),
                        "destroy": true,
                        "columnDefs": [{
                            "targets": [2,3],
                            "render": function (data) {
                                var entType = $('#entType').val();
                                if(entType == 1 || entType == 10){
                                    return data+'%';
                                }
                                return data;
                            }
                        }, {
                            "targets": 4,
                            "render": function (data) {
                                AlterStockInfo = data;
                                if (AlterStockInfo != null) {
                                    $("#alterStockInfo").html("是");
                                }
                                var javascriptDate = convertDate(data);
                                return "<tr>" + javascriptDate + "</tr>";
                            }
                        }, {
                            "targets": [0],
                            "render": function (data, x, obj, index, y) {
                                return index.row + index.settings._iDisplayStart + 1;
                            }
                        }]
                    });
                }
                //默认为否
                $("#alterStockInfo").html("否");

                if (sponsorUrl != null) {
                    sponsorInfo = $("#needPaging_share").DataTable({
                        "bAutoWidth": false,
                        "pagingType": "full_numbers",
                        "language": {
                            "processing": "正在加载，请稍后",
                            "lengthMenu": "显示 _MENU_ 项结果",
                            "zeroRecords": "暂无股东及出资信息",
                            "info": "共 查询到 _TOTAL_ 条记录    共 _PAGES_ 页 ",
                            "infoEmpty": "共 查询到 0 条记录    共 0 页",
                            "infoFiltered": "(由 _MAX_ 项结果过滤)",
                            "infoPostFix": "",
                            "url": "",
                            "paginate": {
                                "first": "首页",
                                "previous": "上一页",
                                "next": "下一页",
                                "last": "末页"
                            }
                        },
                        "processing": true,
                        "serverSide": true,
                        "ordering": false,
                        "ajax": {
                            "url": sponsorUrl,
                            "type": "POST"
                        },
                        "columns": tablecolumns(sponsorColumns),
                        "destroy": true,
                        "columnDefs": [{
                            "targets": [3, 6],
                            "render": function (data) {
                                var javascriptDate = convertDate(data);
                                return "<tr>" + javascriptDate + "</tr>";
                            }
                        }, {
                            "targets": [0],
                            "render": function (data, x, obj, index, y) {
                                return index.row + index.settings._iDisplayStart + 1;
                            }
                        }]
                    });
                }

                $('#forGuaranteeinfo').html('否');
                //是否公示
                //对外担保信息
                if(forGuaranteeinfoUrl){
                    forGuaranteeinfo = $("#needPaging_guarantee").DataTable({
                        "bAutoWidth": false,
                        "pagingType": "full_numbers",
                        "language": {
                            "processing": "正在加载，请稍后",
                            "lengthMenu": "显示 _MENU_ 项结果",
                            "zeroRecords": "暂无对外提供保证担保信息",
                            "info": "共 查询到 _TOTAL_ 条记录    共 _PAGES_ 页 ",
                            "infoEmpty": "共 查询到 0 条记录    共 0 页",
                            "infoFiltered": "(由 _MAX_ 项结果过滤)",
                            "infoPostFix": "",
                            "url": "",
                            "paginate": {
                                "first": "首页",
                                "previous": "上一页",
                                "next": "下一页",
                                "last": "末页"
                            }
                        },
                        "bAutoWidth": false,
                        "processing": true,
                        "serverSide": true,
                        "ordering": false,
                        "ajax": {
                            "url": forGuaranteeinfoUrl,
                            "type": "POST"
                        },
                        "columns": tablecolumns(forGuaranteeinfoColumns),
                        "destroy": true,
                        "columnDefs": [{
                            "targets": [5],
                            "render": function (data,type,row,index) {
                                var javascriptDate = convertDate(data);
                                var javascriptDate2 = convertDate(row.pefPerTo);
                                return "<tr>" + javascriptDate+'-'+javascriptDate2 + "</tr>";
                            }
                        }, {
                            "targets": [0],
                            "render": function (data, x, obj, index, y) {
                                $('#forGuaranteeinfo').html('是');
                                return index.row + index.settings._iDisplayStart + 1;
                            }
                        }, {
                            "targets": [3],
                            "render": function (data) {
                                if (data == 1 ||data == '合同') {
                                    return "合同";
                                } else if (data == 2 ||data == '其他') {
                                    return "其他";
                                }
                            }
                        }
                        ]
                    });
                }

                //年报中  公司的年报的修改信息
                if (alterUrl != null) {

                    alterEInfo = $("#needPaging_modify").DataTable({
                        "bAutoWidth": false,
                        "pagingType": "full_numbers",
                        "language": {
                            "processing": "正在加载，请稍后",
                            "lengthMenu": "显示 _MENU_ 项结果",
                            "zeroRecords": "暂无修改信息",
                            "info": "共 查询到 _TOTAL_ 条记录    共 _PAGES_ 页 ",
                            "infoEmpty": "共 查询到 0 条记录    共 0 页",
                            "infoFiltered": "(由 _MAX_ 项结果过滤)",
                            "infoPostFix": "",
                            "url": "",
                            "paginate": {
                                "first": "首页",
                                "previous": "上一页",
                                "next": "下一页",
                                "last": "末页"
                            }
                        },
                        "processing": true,
                        "serverSide": true,
                        "ordering": false,
                        "ajax": {
                            "url": alterUrl + "?entType=" + ent_type_result,
                            "type": "GET"
                        },
                        "columns": tablecolumns(alterColumns),
                        "destroy": true,
                        "columnDefs": [
                            {
                                "targets": 4,
                                "render": function (data) {
                                    var javascriptDate = convertDate(data);
                                    return "<tr>" + javascriptDate + "</tr>";
                                }

                            },
                            {
                                "targets": 1,
                                "render": function (data, type, row) {

                                    if (row.alitem == "基本信息") {
                                        $("#annualBaseInfoColor1").removeClass("classify").html("").html("<div  class='classify' style='float:left;margin-bottom:10px;font-size:16px;'>" +
                                            "<a href='#modifyMark' style='color:#FF0000;font-size:16px;'>基本信息</a></div>");
                                        $("#annualBaseInfoColor2").removeClass("classify").html("").html("<div  class='classify' style='float:left;margin-bottom:10px;font-size:16px;'>" +
                                            "<a href='#modifyMark' style='color:#FF0000;font-size:16px;'>基本信息</a></div>");
                                        $("#annualBaseInfoColor3").removeClass("classify").html("").html("<div  class='classify' style='float:left;margin-bottom:10px;font-size:16px;'>" +
                                            "<a href='#modifyMark' style='color:#FF0000;font-size:16px;'>基本信息</a></div>");
                                        $("#annualBaseInfoColor4").removeClass("classify").html("").html("<div  class='classify' style='float:left;margin-bottom:10px;font-size:16px;'>" +
                                            "<a href='#modifyMark' style='color:#FF0000;font-size:16px;'>基本信息</a></div>");
                                    } else if (row.alitem == "网站或网店信息") {
                                        $("#annualWebAll").removeClass("classify");
                                        $("#annualWebColor").removeClass("classify").html("").html(" " +
                                            "<a class='classify' href='#modifyMark' style='float:left;margin-bottom:10px;font-size:16px;color:#FF0000;font-size:16px;'>网站或网店信息</a>");
                                    } else if (row.alitem == "股东及出资信息") {
                                        $("#annualSponColor").removeClass("classify").html("").html("<div  class='classify' style='float:left;margin-bottom:10px;font-size:16px;'>" +
                                            "<a  href='#modifyMark' style='color:#FF0000;font-size:16px;'>股东及出资信息</a></div>");
                                    } else if (row.alitem == "对外投资信息") {
                                        $("#annualToOutAll").removeClass("classify");
                                        $("#annualToOutColor").removeClass("classify").html("").html("" +
                                            "<a class='classify' href='#modifyMark' style='float:left;margin-bottom:10px;font-size:16px;color:#FF0000;font-size:16px;'>对外投资信息</a>");
                                    } else if (assert_item_name_container.indexOf(row.alitem)>-1) {
                                        $("#annualAssetsColor1").removeClass("classify").html("").html("<div  class='classify' style='float:left;margin-bottom:10px;font-size:16px;'>" +
                                            "<a href='#modifyMark' style='color:#FF0000;font-size:16px;'>企业资产状况</a></div>");
                                        $("#annualAssetsColor2").removeClass("classify").html("").html("<div  class='classify' style='float:left;margin-bottom:10px;font-size:16px;'>" +
                                            "<a href='#modifyMark' style='color:#FF0000;font-size:16px;'>企业资产状况</a></div>");
                                        $("#annualAssetsColor3").removeClass("classify").html("").html("<div  class='classify' style='float:left;margin-bottom:10px;font-size:16px;'>" +
                                            "<a href='#modifyMark' style='color:#FF0000;font-size:16px;'>企业资产状况</a></div>");
                                    } else if (row.alitem == "社保信息") {
                                        $("#annualSocsecColor").removeClass("classify").html("").html("<div  class='classify' style='float:left;margin-bottom:10px;font-size:16px;'>" +
                                            "<a href='#modifyMark' style='color:#FF0000;font-size:16px;'>社保信息</a></div>");
                                    } else if (row.alitem == "对外提供保证担保信息") {
                                        $("#annualGuaranteeColor").removeClass("classify").html("").html("<div  class='classify' style='float:left;margin-bottom:10px;'>" +
                                            "<a href='#modifyMark' style='color:#FF0000;font-size:16px;'>对外提供保证担保信息</a></div>");
                                    } else if (row.alitem == "股权变更信息") {
                                        $("#annualSponAlterColor").removeClass("classify").html("").html("<div  class='classify' style='float:left;margin-bottom:10px;font-size:16px;'>" +
                                            "<a href='#modifyMark' style='color:#FF0000;font-size:16px;'>股权变更信息</a></div>");
                                    } else if (row.alitem == "分支机构信息") {
                                        $("#annualBranchColor").removeClass("classify").html("").html("<div  class='classify' style='float:left;margin-bottom:10px;font-size:16px;'>" +
                                            "<a href='#modifyMark' style='color:#FF0000;font-size:16px;'>分支机构信息</a></div>");
                                    } else if (row.alitem == "行政许可信息") {
                                        $("#annualLicenceColor").removeClass("classify").html("").html("<div  class='classify' style='float:left;margin-bottom:10px;font-size:16px;'>" +
                                            "<a href='#modifyMark' style='color:#FF0000;font-size:16px;'>行政许可信息</a></div>");
                                    } else if (row.alitem == "生产经营情况信息") {
                                        $("#annualBranchBusinessColor").removeClass("classify").html("").html("<div  class='classify' style='float:left;margin-bottom:10px;font-size:16px;'>" +
                                            "<a href='#modifyMark' style='color:#FF0000;font-size:16px;'>生产经营情况信息</a></div>");
                                    }
                                    //企业通信地址
                                    else if (row.alitem == "企业通信地址") {
                                        $("#addrForColor1").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>企业通信地址：</a>");
                                        $("#addrForColor2").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>企业通信地址：</a>");
                                    }
                                    else if (row.alitem == "统一社会信用代码/注册号" || row.alitem == "营业执照注册号") {
                                        $("#uniscIdForColor1").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>统一社会信用代码/注册号：</a>");
                                        $("#uniscIdForColor2").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>统一社会信用代码/注册号：</a>");
                                        $("#uniscIdForColor3").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>统一社会信用代码/注册号：</a>");
                                        $("#uniscIdForColor4").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>营业执照注册号：</a>");
                                    } else if (row.alitem == "企业名称" || row.alitem == "合作社名称" || row.alitem == "个体商户名称") {
                                        $("#entNameForColor1").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>企业名称：</a>");
                                        $("#entNameForColor2").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>企业名称：</a>");
                                        $("#entNameForColor3").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>合作社名称：</a>");
                                        $("#entNameForColor4").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>个体商户名称：</a>");
                                    } else if (row.alitem == "企业联系电话" || row.alitem == "联系电话" || row.alitem == "经营者联系电话") {
                                        $("#telForColor1").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>企业联系电话：</a>");
                                        $("#telForColor2").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>联系电话：</a>");
                                        $("#telForColor3").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>联系电话：</a>");
                                        $("#telForColor4").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>经营者联系电话：</a>");
                                    } else if (row.alitem == "邮政编码") {
                                        $("#postForColor1").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>邮政编码：</a>");
                                        $("#postForColor2").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>邮政编码：</a>");
                                    } else if (row.alitem == "企业电子邮箱" || row.alitem == "电子邮箱") {
                                        $("#emailForColor1").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>企业电子邮箱：</a>");
                                        $("#emailForColor2").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>电子邮箱：</a>");
                                        $("#emailForColor3").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>电子邮箱：</a>");
                                    } else if (row.alitem == "从业人数" || row.alitem == "成员人数") {
                                        $("#empNumForColor1").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>从业人数：</a>");
                                        $("#empNumForColor2").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>从业人数：</a>");
                                        $("#empNumForColor3").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>成员人数：</a>");
                                        $("#empNumForColor4").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>从业人数：</a>");
                                    } else if (row.alitem == "经营状态") {
                                        $("#busStForColor1").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>经营状态：</a>");
                                        $("#busStForColor2").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>经营状态：</a>");
                                    } else if (row.alitem == "隶属企业名称") {
                                        $("#dependForColor2").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>隶属企业名称：</a>");
                                    } else if (row.alitem == "成员人数中农民人数") {
                                        $("#SfcfarnumForColor3").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>成员人数中农民人数：</a>");
                                    } else if (row.alitem == "本年度新增成员人数") {
                                        $("#SfcannNewMemNumForColor3").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>本年度新增成员人数：</a>");
                                    } else if (row.alitem == "本年度退出成员人数") {
                                        $("#SfcannRedMemNumForColor3").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>本年度退出成员人数：</a>");
                                    } else if (row.alitem == "经营者姓名") {
                                        $("#pbNameForColor4").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>经营者姓名：</a>");
                                    } else if (row.alitem == "资金数额") {
                                        $("#PbfundAmForColor4").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>资金数额：</a>");
                                    }

                                    return "<tr>" + row.alitem + "</tr>";
                                }
                            }, {
                                "targets": [0],
                                "render": function (data, x, obj, index, y) {
                                    return index.row + index.settings._iDisplayStart + 1;
                                }
                            },{
                                "targets": [2,3],
                                "render": function (data) {
                                    if(data.length>60){
                                        var subdata = data.substring(0, 60)+'...<a style="cursor:pointer;float:right" onclick=showMore(this)>更多</a>';
                                        return '<div style="text-align:left" title="'+data+'">'+subdata+'</div><div style="display:none;text-align:left">'+data+'<a style="cursor:pointer;float:right" onclick="hideMore(this)">收起</a></div>'
                                    }else{
                                        return data;
                                    }
                                }
                            }]
                    });
                }


                //默认网店信息为  否
                $("#webIsOrNot").html("否");

                //网站网店信息数据
                var dataForWeb = null;
                //年报中网站网店信息  全部信息   格子形式网店网站信息
                if (webSiteInfoUrl != null) {
                    $.ajax({
                        url: webSiteInfoUrl + "?entType=" + ent_type_result,
                        async: false,
                        success: function (data) {
                            if (data.totalPage > 1) {
                                $("#annualWebAll .personCount").append("<a href='" + allWebInfoModelUrl + "?entType=" + ent_type_result + "' target='_blank'><<查看全部>></a>");
                            }

                            if (data != null && data.data.length > 0) {
                                dataForWeb = data;
                                if (data != null) {
                                    $("#webIsOrNot").html("是");
                                }
                                //格子形式网站网店信息
                                if (data != null && data.data.length > 0) {
                                    var length = data.data && data.data.length;
                                    $('#webCount').html('共计 '+data.recordsTotal+' 条信息');
                                    var str = '';
                                    for (var i = 0; i < length; i++) {
                                        str+='<li><a><div style="font-size:14px;color:#333333;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title="' + data.data[i].webSitName + '">' + data.data[i].webSitName +
                                            '</div><span style="font-size:12px;color:#666666;">· 类型 : '
                                            + '<span style="font-size:12px;color:#333333;" title="' + (data.data[i].webType == 1 ? "网站" : "网店") + '">' + (data.data[i].webType == 1 ? "网站" : "网店") + '</span>' +
                                            '</span><div style="font-size:12px;color:#666666;position:relative;top:-10px;">· 网址 : ' +
                                            '<span style="font-size:12px;color:#333333;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title="' + data.data[i].domain + '">' + data.data[i].domain + '</span></div></a></li>';
                                    }
                                    $("#webSiteList").html(str);
                                }
                            } else {
                                $("#webSiteList").html("").html("<tr class='odd'><td  style='background:#F3F7FA;color:#666;width:1077px;' id='dataTables_empty' colspan='4'>暂无网站或网店信息</td></tr>");
                            }

                        }
                    })
                }

                //初始化  对外投资信息 变量
                var forinvestmentforhome = null;

                //默认 为否
                $("#forInvestment").html("否");

                //年报中对外投资信息  全部信息
                if (forInvestmentUrl != null) {
                    $.ajax({
                        url: forInvestmentUrl,
                        async: false,
                        success: function (data) {
                            if (data.totalPage > 1) {
                                $("#annualToOutAll .personCount").append("<a href='" + allForgModelUrl + "' target='_blank'><<查看全部>></a>");

                            }

                            forinvestmentforhome = data.data.length;
                            if (forinvestmentforhome) {
                                $("#forInvestment").html("是");
                            }
                            //格子形式  对外投资信息
                            if (data != null && data.data.length > 0) {
                                var length = data.data && data.data.length;
                                $('#invCount').html('共计 '+data.recordsTotal+' 条信息');
                                var str = '';
                                for (var i = 0; i < length; i++) {
                                    var strForEntName = "";
                                    if (data.data[i].entName != "" && data.data[i].entName != null && data.data[i].entName.length > 0) {
                                        if (data.data[i].entName.length > 22) {
                                            strForEntName = data.data[i].entName.substring(0, 22);
                                            strForEntName += "...";
                                        } else {
                                            strForEntName = data.data[i].entName;
                                        }
                                    }

                                    var strForUnscId = "";
                                    if (data.data[i].uniscId != "" && data.data[i].uniscId != null && data.data[i].uniscId.length > 0) {
                                        strForUnscId = data.data[i].uniscId;
                                    }


                                    str+='<li><a><div style="font-size:14px;color:#333333;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title="' + data.data[i].entName + '">'
                                        + '' + strForEntName +
                                        '</div><span style="font-size:12px;color:#666666;">· 统一社会信用代码/注册号 : '
                                        + '<span style="font-size:12px;color:#333333;" title="' + data.data[i].uniscId + '">' + strForUnscId + '</span></span></a></li>';
                                }
                                $("#forInvsmentList").html(str);
                            } else {
                                $("#forInvsmentList").html("").html("<tr class='odd'><td  style='background:#F3F7FA;color:#666;width:1077px;' id='dataTables_empty' colspan='4'>暂无对外投资信息</td></tr>");
                            }
                        }
                    })
                }



            }
        }
    });
}

$(document).ready(function(){
    showAnnualReport2($('#entType').val());
    $('#needPaging_assert').find('th').each(function(){
        assert_item_name_container.push($(this).html());
    });
});

function showMore(t){
    $(t).parent().hide();
    $(t).parent().next().show();
}
function hideMore(t){
    $(t).parent().hide();
    $(t).parent().prev().show();
}
